
<?php if($mode == 'LIST'){?>
<?php if($products){?>
    <div class="widget">
        <div class="widgetTitle">
            <h3>Recent Product </h3>
            
        </div>
        <!-- /.widgetTitle -->
        <div class="widgetContent">
            <ul class="list">
                <?php foreach($products as $product):?>
                    <li class="col-sm-3 col-xs-6">
                        <img src="<?= URL::base().'/storage/uploads/products/'.$product->image;?>" class="img-responsive img-thumbnail" >
                        <p>
                            <a href="<?= URL::base();?>/products/detail/<?= Str::slug($product->title);?>/<?= $product->id;?>" class="text-danger">
                                <?= $product->title;?>
                            </a>
                        </p>
                    </li>
                <?php endforeach;?>
            </ul>
        </div>
        <!-- /.widgetContent -->
    </div>
    <!-- /.widget -->
<?php }?>

<?php }?>





<?php if($mode == "PRODUCTS"){?>


<?php if($products){?>
<div class="widget">
    <div class="widgetTitle">
        <h3>Recent Products </h3>
           
    </div>
    <!-- /.widgetTitle -->
    <div class="widgetContent">
        <ul class="aside-list">
            <?php foreach($products as $products):?>
            <li class="">
                <div class="alignLeft col-sm-8 col-xs-8">
                <h3><a href="<?= URL::base();?>/products/detail/<?= Str::slug($products->title);?>/<?= $products->id;?>"><?= Str::title($products->title);?></a></h3>

                <p><span class="smallText"><?= Str::limit($products->description,30);?> </span>
                                    </p>
                                   <p class="text-dark-orange">Price : <?= $products->price;?></p>
                </div>
                <div class="alignRight col-sm-4 col-xs-4 leftBorder">
					<a href="#">
                     <img src="<?= URL::base().'/storage/uploads/products/'.$products->image;?>">
                      </a>
                </div>
            </li>
            <?php endforeach;?>


        </ul>
    </div>
    <!-- /.widgetContent ---->
</div>
<!-- /.widget -->
<?php }?>

<?php }?>